package java69.work717_2;

public class Dog {
    private String variety;//品种
    private int age;
    private boolean sex;//雄性为true，雌性为false
    private String name;

    public Dog() {
    }
    public Dog(String name,boolean sex,int age,String variety) {
        this.age = age;
        this.name = name;
        this.sex = true;//默认为雄性
        this.variety = variety;
    }

    public String getVariety() {
        return variety;
    }

    public void setVariety(String variety) {
        this.variety = variety;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public boolean isSex() {
        return sex;
    }

    public void setSex(String sex) {
        if (sex.equals("雌性")){
            this.sex = false;
        }else  if (sex.equals("雄性")){
        }else {
            System.out.println("请输入正确性别！默认雄性");
        }
        this.sex = true;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String issex(){
        if (isSex()){
            return "雄性";
        }
        return "雌性";
    }

    public void  run(){
        System.out.println("狗狗正在跑");
    }
    public void  call(){
        System.out.println("狗狗正在叫");
    }
}
